<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="b" uri="/b2b-tags"%>
<div class="header" >
 	<c:import url="/views/jsp/include/inc_login.jsp" />
 	<c:import url="/views/jsp/include/inc_search.jsp" />
	<div class="bg_nav">
		<div class="w">
			<div class="nav_left  fl">
				<div id="all_lei">所有商品分类</div>
				<div id="categorys" style="display:none">
					<div class="categorys_list fl">
					<ul id="_JD_ALLSORT" class="mc">
					<b:showProductCategory outResponseAttrName="pType" />
					<c:forEach var="type" items="${pType.data.type }" varStatus="varstatus">
					<li style="border-top-style: none; background-color: rgb(255, 255, 255);">
							<div> 
								<span>
									<h3><b>${type.productTypeName }</b>
										<p>
										 <c:forEach var="childType" items="${type.emBProductTypeList }">
										 	<a href="<%=request.getContextPath() %>/product/searchProduct.s?productTypeCode=${childType.productTypeCode}" >${childType.productTypeName } </a>
										 </c:forEach>
										</p>
									</h3>
								</span>
								<div class="category " style=" ">
									<!-- 
									<div class="brand_bd">
										<div class="newstitle"><b>推荐品牌</b><i></i></div>
										<div class="pp_tuijian fl">
											<h2><a href="#">东阿阿胶</a></h2>
											<h2><a href="#">云南白药</a></h2>
										</div>
									</div>
									 -->
									<div class="mode-bd m-left">
									<c:forEach var="childType" items="${type.emBProductTypeList }" varStatus="varstatus">
										<dl>
											<c:if test="${varstatus.index%2 ==0 }">
												<dt><a href="<%=request.getContextPath() %>/product/searchProduct.s?productTypeCode=${childType.productTypeCode}" >${childType.productTypeName } </a></dt>
												
												<c:if test="${not empty childType.emBProductTypeList}" >
													<dd>
													<c:forEach var="childType2" items="${childType.emBProductTypeList }"  >
														<em><a href="<%=request.getContextPath() %>/product/searchProduct.s?productTypeCode=${childType2.productTypeCode}" >${childType2.productTypeName } </a></em>
													</c:forEach> 
													</dd>
												</c:if>
											</c:if>
										</dl>
									 </c:forEach>
									</div>
									<div class="mode-bd m-right">
											<c:forEach var="childType" items="${type.emBProductTypeList }" varStatus="varstatus">
												<dl>
													<c:if test="${varstatus.index%2 !=0 }">
														<dt><a href="<%=request.getContextPath() %>/product/searchProduct.s?productTypeCode=${childType.productTypeCode}" >${childType.productTypeName } </a></dt>
														
														<c:if test="${not empty childType.emBProductTypeList}" >
															<dd>
															<c:forEach var="childType2" items="${childType.emBProductTypeList }"  >
																<em><a href="<%=request.getContextPath() %>/product/searchProduct.s?productTypeCode=${childType2.productTypeCode}" >${childType2.productTypeName } </a></em>
															</c:forEach> 
															</dd>
														</c:if>
													</c:if>
												</dl>
											 </c:forEach>
									</div>
								</div>
							</div>
						</li>
					</c:forEach>
					</ul>
				</div>
                <div class="gdfl fl">
					<a href="<c:url value="/views/jsp/product/all_product_type_d.jsp" />" target="_blank">查看更多分类</a>
				</div>
				
			</div>
			</div>
			<c:import url="/views/jsp/include/inc_nav.jsp" />
		</div>
	</div>
</div>
<!--头部结束-->
<script>
$(function() {
	$("#_JD_ALLSORT li:even").css("background-color", "#ffffff");   //奇数行
	$("#_JD_ALLSORT li:odd").css("background-color", "#f5f7ff");//偶数行
	
	$(".mc li").hover(function() {
	$(this).attr("class","show");
		var newstitle = $(this).find(".newstitle");
		if(newstitle.attr("class") != "newstitle ed" ){
			newstitle.css({
				position:'absolute',
		   		left: 0,
				top:0
		   		<!--top: ($(this).find(".pp_tuijian").height()- newstitle.outerHeight())/2-->
			});
			newstitle.attr("class","newstitle ed")
		}
	}, function() {
	$(this).attr("class","");
	});	

	 
	 
});
 

//登陆框初始化
var loginhtml, validation = function(){
    //验证写在这
};
var page = {};
page.url='<c:url value="/views/jsp/include/dialog_login.jsp" />';
page.ok = function(datas){
    loginhtml = datas; //保存登录节点
    validation();
};
if(loginhtml){page.html = loginhtml;}
layer.login = function(options){
    options = options || {};
    loginLayer = $.layer({
        type: 1,
        title: '用户登录',
        offset: [($(window).height() - 360)/2+'px', ''],
        border : [5, 0.5, '#666'],
        area: ['450px','290px'],
        shadeClose: true,
        page: page
    });
};
</script>